package com.hdsx.restful.ygzt.kybx.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hdsx.ao.base.BaseOpearte;
import com.hdsx.restful.ygzt.kybx.bean.Kybx;
import com.hdsx.restful.ygzt.kybx.mapper.KybxMapper;
import com.hdsx.restful.ygzt.kybx.service.KybxServer;
/**
 * kybxServer实现类
 *
 */
@Service
public class KybxServerImpl extends BaseOpearte<Kybx> implements KybxServer {

	public KybxServerImpl() {
		super("GIS_KYBX");
	}

	@Resource(name="kybxMapper")
	private KybxMapper mapper;

	@Override
	public int queryCount( String bxmc,String xzqhbm) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("name", bxmc);
		parameter.put("xzqhbm", xzqhbm);
		return mapper.queryCount(parameter);
	}

	@Override
	public List<Kybx> queryList( String bxmc,String xzqhbm, int begin, int end) {
		Map<String,Object> parameter=new HashMap<String,Object>();
		parameter.put("name", bxmc);
		parameter.put("xzqhbm", xzqhbm);
		parameter.put("begin", begin);
		parameter.put("end", end);
		List<Kybx> lists=mapper.queryList(parameter);
		return lists;
	}

	@Override
	public Kybx queryById(String id) {
		return mapper.selectById(id);
	}
	
	@Override
	public List<String> selectName(String name){
		return mapper.selectName(name);
	}
}
